package com.fengziyu.lib_recyclerview_fzy.mvvm

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

abstract class BaseActivity<VM: BaseViewModel>: AppCompatActivity() {
    protected lateinit var viewModel: VM

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        viewModel = initViewModel()
    }

    protected abstract fun initViewModel(): VM
}